import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { AccountVO } from "@/api/retail/account/types";
import {AccountHistoryQuery, AccountHistoryVO} from "@/api/retail/accountHistory/types";

/**
 * 賬號信息
 */
export const getAccountList = (): AxiosPromise<AccountVO[]> => {
  return request({
    url: '/shop/account/list',
    method: 'get'
  });
};

export const getAccountHistory = (query?: AccountHistoryQuery): AxiosPromise<AccountHistoryVO[]> => {
  return request({
    url: '/shop/account/historyList',
    method: 'get',
    params: query
  });
};
